<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p>{{name}}</p>
        <input type="text">
        <input type="button" @click="showHello($event,40)" value="显示提示语">
        <p :class="c_p">欢迎{{name}}光临</p>
        <p v-show="isShow">欢迎v_show</p>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                name: "张三",
                age: 100,
                sex: "男",
                c_p: "a",
                isShow: false
            },
            methods: {                
                showHello(event,params) {
                    console.log(event.target.value);
                    console.log(params);
                    this.c_p = "b";
                    this.isShow = true;
                }
            }
        })
    </script>
    <style>
        .a {
            visibility: hidden;
        }

        .b {
            visibility: visible;
        }
    </style>
</body>
</html>